<template>
  <div class="body">
    <!-- 暂时不用-->
 <!--   <div class="currentApp">
      <div class="currentAppContent">
        <Select v-model="allApps.currentApp" style="width:200px;border-radius: 16px" @on-change="changeApp">
          <Option v-for="item in allApps.apps.data" :value="item.id" :key="item.productName">
            {{ item.productName }}
          </Option>
        </Select>
      </div>
    </div>-->
    <router-view></router-view>
  </div>
</template>
<script>
  import {mapState} from 'vuex'
  import storage from '@/utils/helpers/storageLite'
  import Model from '@/models/apps'

  export default {
    name: 'body',
    data () {
      return {
        appList: '',
        currentApp: ''
      }
    },
    computed: mapState({
      'allApps': state => state.allApps
    }),
    created () {
     // this.get()
    },
    methods: {
      changeApp (value) {
        this.$store.commit('GET_CURRENTAPP', {
          'data': value
        })
        this.$route.params.id = value
      },
      get () {
        this.$store.dispatch('getAllApps', {
          params: {
            userNo: storage.get('userNo')
          }
        })
        this.$store.commit('GET_CURRENTAPP', {
          'data': this.$route.params.id
        })
      }
    }
  }
</script>

<style lang="scss" scoped src="./styles/index.scss">
</style>
